package models;

import java.util.Collection;

import net.roarsoftware.lastfm.Album;

public class LastFMWrapper {
	String key = "b5923ebe1bea50b566ecfd1c0684b051";
	
	public LastFMWrapper () {
		// default constructor
	}
	
	public void printResults() {
		Collection<Album> albums = Album.search("Absolution", this.key);
		
		for (Album album : albums) {
			System.out.println("Album: " + album.getName() + " " + album.getArtist());
		}
	}
	
	public static void main(String[] args) {
		try {


			/*
			//String user = "JRoar";
			Chart<Artist> chart = User.getWeeklyArtistChart(user, 10, key);
			DateFormat format = DateFormat.getDateInstance();
			String from = format.format(chart.getFrom());
			String to = format.format(chart.getTo());
			System.out.printf("Charts for %s for the week from %s to %s:%n", user, from, to);
			Collection<Artist> artists = chart.getEntries();
			for (Artist artist : artists) {
				System.out.println(artist.getName());
			}
			*/
			} catch (Exception e) {
				System.out.println(e.getMessage());
			}
	}

}
